projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1428962
)
Avoid a warning in python-eldoc-setup-code
author
Carlos Pita
<carlosjosepita@gmail.com>
Mon, 4 Oct 2021 09:43:17 +0000
(11:43 +0200)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Mon, 4 Oct 2021 09:43:17 +0000
(11:43 +0200)
* lisp/progmodes/python.el (python-eldoc-setup-code): Avoid a
deprecation warning about formatargspec (bug#50996).
lisp/progmodes/python.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/python.el
b/lisp/progmodes/python.el
index c58ac6f637d29e2d256c74e13bc286c7736dc68d..43ee3c0c152105e521a13511e1e149d9fd515c34 100644
(file)
--- a/
lisp/progmodes/python.el
+++ b/
lisp/progmodes/python.el
@@
-4671,7
+4671,10
@@
See `python-check-command' for the default."
target = obj
objtype = 'def'
if target:
- args = inspect.formatargspec(*argspec_function(target))
+ if hasattr(inspect, 'signature'):
+ args = str(inspect.signature(target))
+ else:
+ args = inspect.formatargspec(*argspec_function(target))
name = obj.__name__
doc = '{objtype} {name}{args}'.format(
objtype=objtype, name=name, args=args